/**
 * 
 */
package com.ihg.hiex.entity.session.during;

import org.apache.commons.lang3.StringUtils;

import com.demo2do.core.utils.Alias;

/**
 * @author downpour
 *
 */
@Alias("SessionCompetencyType")
public enum SessionCompetencyType {
	
	OWNER_RELATIONS("Owner Relations", "owner-relations", "competency.owner.relations", "业主关系"),
    
    DRIVE_RESULT("Drive Result", "drive-result", "competency.drive.result", "成效驱动"),
    
    OPERATIONS_MANAGEMENT("Operations Management", "operations-management", "competency.operations.management", "运营管理"),
	
	REVENUE_MAXIMISATION("Revenue Maximisation", "revenue-maximisation", "competency.revenue.maximisation", "收益最大化"),
    
    CHAMPION_CHANGE("Champion Change", "champion-change", "competency.champion.change", "主导变革"),
    
    LEAD_AND_DEVELOPMENT("Lead And Development", "lead-and-development", "competency.lead.and.development", "领导和发展员工"),
    
    WORK_COLLABORATIVELY("Work Collaboratively", "work-collaboratively", "competency.work.collaboratively", "全面协作"),
    
    FINANCE_MANAGEMENT("Financial Management", "finance-management", "competency.finance.management", "财务管理"),
    
    OTHER("Other", "other", "competency.other", "其他");

    private String description;
    
    private String alias;
    
    private String message;
    
    private String name;
    
    /**
     * @param description
     * @param alias
     * @param message
     */
    private SessionCompetencyType(String description, String alias, String message, String name) {
        this.description = description;
        this.alias = alias;
        this.message = message;
        this.name = name;
    }

    /**
     * @param description
     * @return
     */
    public static SessionCompetencyType descriptionOf(String description) {
        for(SessionCompetencyType sessionCompetencyType : SessionCompetencyType.values()) {
            if(StringUtils.equalsIgnoreCase(sessionCompetencyType.getDescription(), description)) {
                return sessionCompetencyType;
            }
        }
        return null;
    }

    /**
     * 
     * @param alias
     * @return
     */
    public static SessionCompetencyType aliasOf(String alias) {
        for(SessionCompetencyType sessionCompetencyType : SessionCompetencyType.values()) {
            if(StringUtils.equalsIgnoreCase(sessionCompetencyType.getAlias(), alias)) {
                return sessionCompetencyType;
            }
        }
        return null;
    }
    
    /**
     * 
     * @return
     */
    public boolean isOther() {
        return this.equals(OTHER);
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the alias
     */
    public String getAlias() {
        return alias;
    }
    
    /**
     * @return
     */
    public String getMessage() {
        return message;
    }
    
    /**
     * 
     * @return
     */
    public String getName() {
        return name;
    }

}
